﻿using System.Collections.ObjectModel;
using PackagingTool.Models;
using ReactiveUI;

namespace PackagingTool.ViewModels;

public class MainWindowViewModel : ViewModelBase
{
    private ObservableCollection<SelectFileItem> _files = new()
    {
        new SelectFileItem()
        {
            Name = "test"
        }
    };

    public ObservableCollection<SelectFileItem> Files
    {
        get => _files;
        set => this.RaiseAndSetIfChanged(ref _files, value);
    }

    private string _search;

    public string Search
    {
        get => _search;
        set => this.RaiseAndSetIfChanged(ref _search, value);
    }

    public Interaction<BuildProjectSettingViewModel, BuildProjectSettingViewModel> ShowDialog { get; }
    
    public Interaction<BuildPlanViewModel,bool> ShowBuildPlanDialog { get; }

    public MainWindowViewModel()
    {
        ShowDialog = new Interaction<BuildProjectSettingViewModel, BuildProjectSettingViewModel>();
        ShowBuildPlanDialog = new Interaction<BuildPlanViewModel, bool>();
    }
}